﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TreeManagement.Querry;
using TreeManagement.Statistic;

namespace TreeManagement
{
    public partial class MainForm : Form
    {
        private int childFormNumber = 0;

        public MainForm()
        {
            InitializeComponent();
        }

        private void ShowWardForm(object sender, EventArgs e)
        {
            WardForm childForm = new WardForm();
            childForm.WindowState = FormWindowState.Maximized;
            childForm.MdiParent = this;           
            childForm.Show();
        }

        private void ShowRoadForm(object sender, EventArgs e)
        {
            RoadForm childForm = new RoadForm();
            childForm.WindowState = FormWindowState.Maximized;
            childForm.MdiParent = this;           
            childForm.Show();
        }

        private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void ShowTreeForm(object sender, EventArgs e)
        {
            TreeForm childForm = new TreeForm();
            childForm.WindowState = FormWindowState.Maximized;
            childForm.MdiParent = this;
            childForm.Show();
        }

        private void tìmCâyXanhToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SearchTree childForm = new SearchTree();
            childForm.WindowState = FormWindowState.Maximized;
            childForm.MdiParent = this;
            childForm.Show();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            MapForm childForm = new MapForm();
            childForm.WindowState = FormWindowState.Maximized;
            childForm.MdiParent = this;
            childForm.Show();
        }

        private void thốngKêCâyXanhToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StatisticTree frm  = new StatisticTree();
            frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }
       
    }
}
